package com.rfy.user.api;


import com.rfy.base.entity.response.BaseResponse;
import com.rfy.user.entity.Bookmark;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author simaduoduo
 * @date 2019/7/25 14:49
 * @desc 书签模块
 */
@Api(tags = "用户书签服务")
@RequestMapping("/rfy/bookmark/")
public interface BookmarkApi {


    @RequestMapping(value = "add",method = RequestMethod.POST)
    @ApiOperation(value = "用户书签增加")
    @ApiImplicitParam(name = "bookmark",value = "书签实体类",required = true,dataType = "Bookmark")
    BaseResponse addBookmark(@RequestBody Bookmark bookmark);


    @RequestMapping(value = "delete/{id}",method = RequestMethod.DELETE)
    @ApiOperation(value = "用户书签删除")
    @ApiImplicitParam(name = "id",value = "书签ID",required = true,example = "1",dataType = "Integer")
    BaseResponse deleteBookmark(@PathVariable(value = "id") Integer id);


    @RequestMapping(value = "update",method = RequestMethod.PUT)
    @ApiOperation(value = "用户书签修改")
    @ApiImplicitParam(name = "bookmark",value = "书签实体类",required = true,dataType = "Bookmark")
    BaseResponse updateBookmark(@RequestBody Bookmark bookmark);


    @RequestMapping(value = "query/{userId}",method = RequestMethod.GET)
    @ApiOperation(value = "用户书签查询")
    @ApiImplicitParam(name = "userId",value = "用户ID",required = true,example = "1",dataType = "Integer")
    BaseResponse queryBookmarks(@PathVariable(value = "userId") Integer userId);
}
